projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7246d1d
)
(gethomedir): Look at LOGNAME before USER.
author
Karl Heuer
<kwzh@gnu.org>
Sat, 12 Feb 1994 00:12:15 +0000
(
00:12
+0000)
committer
Karl Heuer
<kwzh@gnu.org>
Sat, 12 Feb 1994 00:12:15 +0000
(
00:12
+0000)
src/xrdb.c
patch
|
blob
|
history
diff --git
a/src/xrdb.c
b/src/xrdb.c
index 112badf3629e0bf5c18f1ffe6f1078c46ac08a22..9ab9f87e9151a5e012e3d896c61715a73af70863 100644
(file)
--- a/
src/xrdb.c
+++ b/
src/xrdb.c
@@
-288,20
+288,17
@@
magic_file_p (string, string_len, class, escaped_suffix, suffix)
static char *
gethomedir ()
{
- int uid;
struct passwd *pw;
char *ptr;
char *copy;
if ((ptr = getenv ("HOME")) == NULL)
{
- if ((ptr = getenv ("USER")) != NULL)
+ if ((ptr = getenv ("LOGNAME")) != NULL
+ || (ptr = getenv ("USER")) != NULL)
pw = getpwnam (ptr);
else
- {
- uid = getuid ();
- pw = getpwuid (uid);
- }
+ pw = getpwuid (getuid ());
if (pw)
ptr = pw->pw_dir;